home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / B-C / Clean Source 1.0.cpt / Clean Source 1.0 / Clean Source Readme next >
Encoding:
Text File  |  1993-09-23  |  3.4 KB  |  29 lines  |  [TEXT/ttxt]

  1. Clean Source
  2. Copyright © 1993, Alan Fargusson
  3. All rights reserved
  4.  
  5. To use: launch the application, select or de-select any options you want, press the Go button (or use command-G, or command-O), then select the file you want cleaned.  You may clean as many files in one session as you want by pressing the Go button again.
  6.  
  7. This application came about because I noticed that the Think C editor tends to leave some junk in the source.  For example if you are indenting and leave a blank line the editor keeps the tabs that indent to the proper level.  Clean Source removes these extra tabs.  The way this is done has the helpful side effect of removing trailing tabs and spaces that I sometimes put on the end of a line accidentally.  Note that Clean Source will not change the contents of a comment or a string.
  8.  
  9. The second thing I put in this application is the ability to put marks for each function in a program.  I find this to be a very handy feature since I have found that the Think editor causes the marks I placed to move around (even though this was suppose to be fixed in 5.0.4 it still happens in 6.0).  Clean Source will optionally keep any marks that are not function names.  One side effect is that duplicate marks will be removed.  You can have two marks with the same name in the Think C editor.  Clean Source only keeps the first one.
  10.  
  11. The third and last feature I added to Clean Source is the ability to turn multiple spaces into tabs.  This was the most difficult to get right.  I have tested this extensively, so it should be in good shape now.  In fact I have used Clean Source on every C source file on my system.
  12.  
  13. Clean Source will not try and process #if constructs.  The result is that the marks might not be where you want if you have two definitions of a function in #if - #else constructs, but if you do this it is hard to guess where you would want the mark.
  14.  
  15. Clean Source ignores #define lines, and in fact anything following a #.  It would take too much parsing to do this using the ad hoc method currently use, so this will wait until I get flex working on the Mac.  Once I do handle #define I will also do #pragma mark directives.
  16.  
  17. Currently Clean Source only works for C source files.  I haven't learned enough about C++, or the resource compiler to do those.  C++ sources may work well enough without recognizing C++ constructs, but I haven't tested this.
  18.  
  19. There are some features I will add in the future when I have time.  One is drag and drop.  I just haven't had time to figure out all the System 7 stuff.  Actually it would be nice to build this application into the Think editor.  If I can get a copy of the document that tells how to do it I will try to make Clean Source an extension to the editor.
  20.  
  21. I may add some translations.  I move source files from UNIX to the Mac, and the newline to carriage return conversion is painful in the Think C editor, and only a little better in MS Word.  BBEdit does this really well though, so I probably won't bother.
  22.  
  23. Clean Source does not have a way of changing the tab size, or creating a tab resource.  You can do this with the Think editor.  It has no way of changing the owner of a file, which might be handy if you bring sources over from a UNIX or PC-DOS system.  ResEdit will do this, but it is easier to use the 'save as' dialog in BBEdit.
  24.  
  25. This is my first attempt at shareware.  If you find this application useful please send $10 to:
  26.  
  27. Alan Fargusson
  28. 450 West Central #306
  29. Tracy, CA. 95376